package fun.tan90.easy.binlog.base.strategy;

/**
 * description 策略执行抽象
 * company 铁人科技
 *
 * @author 陈浩杰
 * @date 2022/8/14 20:47
 */
public interface AbstractExecuteStrategy<REQUEST, RESPONSE> {

    /**
     * 执行策略标识
     *
     * @return
     */
    String mark();

    /**
     * 是否生效
     *
     * @return
     */
    default boolean effect() {
        return true;
    }

    /**
     * 执行策略
     *
     * @param requestParam
     */
    default void execute(REQUEST requestParam) {
    }

    /**
     * 执行策略，带返回值
     *
     * @param requestParam
     * @return
     */
    default RESPONSE executeResp(REQUEST requestParam) {
        return null;
    }
}
